<html>
<head><meta charset="utf-8"><title>Cross compiling x86_musl on Ubuntu · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html">Cross compiling x86_musl on Ubuntu</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="229478961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229478961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229478961">(Mar 09 2021 at 13:49)</a>:</h4>
<p>Hey all. I'm trying to cross compile to <code>x86_64-unknown-linux-musl</code> on Ubuntu. I've installed the musl toolchain from <a href="https://musl.libc.org/">here</a> and followed the instructions to install. Installation seems to have worked as I have relevant headers and shared libraries in <code>/user/local/musl</code>. </p>
<p>When I tried to compile a little hello-world example with <code> RUSTFLAGS="-C target-feature=-crt-static" cargo +nightly build --release --target=x86_64-unknown-linux-musl</code> I get an error saying that <code>undefined reference to '__libc_csu_fini'</code>. This seems to be because it's still trying to use the glibc dynamic linker for my program. I'm trying to override it with adding <code>-C link-arg=-Wl,-dynamic-linker=/lib/x86_64-linux-musl/libc.so</code> but that doesn't seem to have any effect. Any ideas what the issue could be?</p>



<a name="229481653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229481653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229481653">(Mar 09 2021 at 14:07)</a>:</h4>
<p>Here's a link to the call to <code>cc</code> that fails: <a href="https://gist.github.com/rylev/177b3e53fa1f3452be125860ca099ad9">https://gist.github.com/rylev/177b3e53fa1f3452be125860ca099ad9</a></p>



<a name="229482189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482189">(Mar 09 2021 at 14:11)</a>:</h4>
<p>You want <code>-Clinker</code></p>



<a name="229482310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482310">(Mar 09 2021 at 14:11)</a>:</h4>
<p>Instead of <code>-C</code>? Do I keep <code>link-arg</code> then?</p>



<a name="229482422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482422">(Mar 09 2021 at 14:12)</a>:</h4>
<p>No, I mean you want to tell rustc what linker to use via <code>-Clinker</code>, you don't need the <code>-Clink-args</code> at all.</p>



<a name="229482452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482452">(Mar 09 2021 at 14:12)</a>:</h4>
<p>There's a way to set the target specific linkers in cargo config, let me find you the reference.</p>



<a name="229482513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482513">(Mar 09 2021 at 14:13)</a>:</h4>
<p><a href="https://doc.rust-lang.org/cargo/reference/config.html#target">https://doc.rust-lang.org/cargo/reference/config.html#target</a> is a good example.</p>



<a name="229482555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482555">(Mar 09 2021 at 14:13)</a>:</h4>
<p>But I'm fine with using the system linker, I just need to change the dynamic linker (aka dynamic loader).</p>



<a name="229482614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482614">(Mar 09 2021 at 14:13)</a>:</h4>
<p><code>ld</code> should be able to do what I need it to</p>



<a name="229482664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482664">(Mar 09 2021 at 14:13)</a>:</h4>
<p>the <code>cc</code> will presume --target==--build though.</p>



<a name="229482779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482779">(Mar 09 2021 at 14:14)</a>:</h4>
<p>when you installed the toolchain it should've added something like <code>x86_64-musl-gcc</code> to your path.</p>



<a name="229482950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229482950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229482950">(Mar 09 2021 at 14:15)</a>:</h4>
<p>Using target-specific gcc as a linker _should_ also correctly set the correct loader transparently.</p>



<a name="229483322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229483322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229483322">(Mar 09 2021 at 14:17)</a>:</h4>
<p>Ok that works! Thank you!</p>



<a name="229483562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229483562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229483562">(Mar 09 2021 at 14:19)</a>:</h4>
<p>The underlying issue is really not at all related to the loader, for what it's worth. Its more like <code>cc</code> adding in the glibc C runtime initialization objects. The way gcc toolchains work I believe make this kind of baked into <code>gcc</code> at compile time.</p>



<a name="229486076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229486076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229486076">(Mar 09 2021 at 14:35)</a>:</h4>
<p>Looks like the binary still dynamically links against libgcc_s.so.1. I need to turn that off now</p>



<a name="229488095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229488095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229488095">(Mar 09 2021 at 14:48)</a>:</h4>
<p>I think it might be used as an unwinding implementation?</p>



<a name="229492766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229492766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229492766">(Mar 09 2021 at 15:17)</a>:</h4>
<p><span class="user-mention" data-user-id="224872">@rylev</span> I'm curious, why do you want <code>-crt-static</code>?</p>



<a name="229494078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229494078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229494078">(Mar 09 2021 at 15:26)</a>:</h4>
<p>I don’t want to statically link the musl runtime. I’m running in an environment with a musl c runtime I can dynamically link to</p>



<a name="229495062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229495062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229495062">(Mar 09 2021 at 15:32)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu/near/229488095">said</a>:</p>
<blockquote>
<p>I think it might be used as an unwinding implementation?</p>
</blockquote>
<p>Yea unwinding symbols are what it can't relocate</p>



<a name="229495465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229495465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229495465">(Mar 09 2021 at 15:35)</a>:</h4>
<p>I was hoping that I could statically link lib gcc but <code>-C link-args=-static-libgcc</code> does not seem to work</p>



<a name="229495812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229495812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229495812">(Mar 09 2021 at 15:37)</a>:</h4>
<p>And if I set <code>panic=abort</code> there are still some unwind symbols...</p>



<a name="229496152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229496152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229496152">(Mar 09 2021 at 15:39)</a>:</h4>
<p>Is there a reason unwind symbols are still present on <code>panic=abort</code>?</p>



<a name="229496308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229496308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229496308">(Mar 09 2021 at 15:40)</a>:</h4>
<p>Is it the std lib who is bringing in those symbols?</p>



<a name="229502993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229502993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229502993">(Mar 09 2021 at 16:13)</a>:</h4>
<p>unwinding is still needed for backtraces</p>



<a name="229503160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229503160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229503160">(Mar 09 2021 at 16:14)</a>:</h4>
<p><span class="user-mention" data-user-id="120518">@Eric Huss</span> any idea what I might be able to do as an alternative here? My environment does not have libgcc. Does that mean I can't use std?</p>



<a name="229503393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229503393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229503393">(Mar 09 2021 at 16:14)</a>:</h4>
<p>(this seems to work when compiling on Alpine Linux, so I'm inclined to think there is a way to not rely on a dynamic libgcc)</p>



<a name="229504174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229504174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229504174">(Mar 09 2021 at 16:17)</a>:</h4>
<p>Can you use Docker?</p>



<a name="229504242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229504242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229504242">(Mar 09 2021 at 16:18)</a>:</h4>
<p>My understanding is that with dynamic musl, you have to install the libgcc package.  Sorry, I'm not deeply familiar with this stuff.</p>



<a name="229504393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229504393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229504393">(Mar 09 2021 at 16:19)</a>:</h4>
<p><span class="user-mention silent" data-user-id="203546">Laurențiu Nicola</span> <a href="#narrow/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu/near/229504174">said</a>:</p>
<blockquote>
<p>Can you use Docker?</p>
</blockquote>
<p>Yes, I was just trying to see what it would take to not require using Docker</p>



<a name="229504487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229504487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229504487">(Mar 09 2021 at 16:19)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120518">Eric Huss</span> <a href="#narrow/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu/near/229504242">said</a>:</p>
<blockquote>
<p>My understanding is that with dynamic musl, you have to install the libgcc package.  Sorry, I'm not deeply familiar with this stuff.</p>
</blockquote>
<p>Hmm statically linking libgcc would be fine, but I can't figure out a way to get that to work.</p>



<a name="229504690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229504690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229504690">(Mar 09 2021 at 16:20)</a>:</h4>
<p>I asked the same thing in <a href="#narrow/stream/131828-t-compiler/topic/Dynamic.20CRT.20on.20musl">https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Dynamic.20CRT.20on.20musl</a></p>



<a name="229504712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229504712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229504712">(Mar 09 2021 at 16:20)</a>:</h4>
<p>We ended up using Docker. YMMV.</p>



<a name="229505079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229505079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229505079">(Mar 09 2021 at 16:22)</a>:</h4>
<p>You can also give that <a href="https://github.com/richfelker/musl-cross-make">https://github.com/richfelker/musl-cross-make</a> a try</p>



<a name="229678381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Cross%20compiling%20x86_musl%20on%20Ubuntu/near/229678381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Cross.20compiling.20x86_musl.20on.20Ubuntu.html#229678381">(Mar 10 2021 at 15:17)</a>:</h4>
<p>Looks like there's already an issue for this: <a href="https://github.com/rust-lang/rust/issues/82521">https://github.com/rust-lang/rust/issues/82521</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>